<?php

namespace App\Http\Controllers;

use App\Exceptions\ApiException;
use App\Library\Requests\OrderPageRequest;
use App\Library\Service\OrderService;
use Illuminate\Http\JsonResponse;

class OrderController extends BaseController
{
    public function __construct(OrderService $service)
    {
        return $this->service = $service;
    }

    /**
     * paging
     * @param OrderPageRequest $request
     * @return JsonResponse
     * @throws ApiException
     */
    public function paging(OrderPageRequest $request): JsonResponse
    {
        return $this->service->paging($request);
    }
}
